﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraReports.UI;
using DevExpress.LookAndFeel;

using QLTTAN.Report;
namespace QLTTAN.Form
{
    public partial class frmBaoCaoKeToan : DevExpress.XtraEditors.XtraForm
    {
        public frmBaoCaoKeToan()
        {
            InitializeComponent();
        }

        private void frmBaoCaoKeToan_Load(object sender, EventArgs e)
        {
            dateThang.EditValue = DateTime.Now;
        }

        private void btnXemIn_Click(object sender, EventArgs e)
        {
            rpBaoCaoKeToan rpbckt = new rpBaoCaoKeToan((DateTime)dateThang.EditValue);

            using (ReportPrintTool printTool = new ReportPrintTool(rpbckt))
            {
                printTool.ShowPreviewDialog();
                printTool.ShowPreview(UserLookAndFeel.Default);
            }
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}